import request from '@/utils/request'

// 查询合同交货列表
export function listDelivery(query) {
  return request({
    url: '/business/delivery/list',
    method: 'get',
    params: query
  })
}

// 查询合同成本列表
export function listContractDelivery(query) {
  return request({
    url: '/business/delivery/listContractDelivery',
    method: 'get',
    params: query
  })
}

// 查询合同交货详细
export function getDelivery(deliveryId) {
  return request({
    url: '/business/delivery/' + deliveryId,
    method: 'get'
  })
}

// 新增合同交货
export function addDelivery(data) {
  return request({
    url: '/business/delivery',
    method: 'post',
    data: data
  })
}

// 修改合同交货
export function updateDelivery(data) {
  return request({
    url: '/business/delivery',
    method: 'put',
    data: data
  })
}

// 删除合同交货
export function delDelivery(deliveryId) {
  return request({
    url: '/business/delivery/' + deliveryId,
    method: 'delete'
  })
}

// 导出合同交货
export function exportDelivery(query) {
  return request({
    url: '/business/delivery/export',
    method: 'get',
    params: query
  })
}